<template>
	<view class="video">
		<video v-for="(item, index) in materialData" v-if="item.type==='视频'" class="my-video" :src="item.url" :danmu-list="danmuList" enable-danmu danmu-btn controls></video>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src: '',
				danmuList: [{
						text: '第 1s 出现的弹幕',
						color: '#ff0000',
						time: 1
					},
					{
						text: '第 3s 出现的弹幕',
						color: '#ff00ff',
						time: 3
					}
				],
				danmuValue: ''
			}
		},
		props: {
			materialData: Array
		}
	}
</script>

<style>
	.video{
		background-color: #f5f8f8;
		padding-bottom: 20rpx;
	}
	.my-video{
		width: 750rpx;
	}
</style>
